package com.luoyx.hauyne.admin.sys.service.impl;

import com.luoyx.hauyne.admin.sys.entity.UserRole;
import com.luoyx.hauyne.admin.sys.mapper.UserRoleMapper;
import com.luoyx.hauyne.admin.sys.service.UserRoleService;
import com.luoyx.hauyne.mybatisplus.service.impl.BaseServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 用户-角色中间表 服务实现类
 * </p>
 *
 * @author Alan.Luo
 * @since 2022-09-07
 */
@Service
public class UserRoleServiceImpl extends BaseServiceImpl<UserRoleMapper, UserRole> implements UserRoleService {
    /**
     * 统计当前角色的使用人数
     *
     * @param roleIds 角色id集合
     * @return 角色名称
     */
    @Override
    public String countUserRoleByRoleIds(List<Long> roleIds) {
        return baseMapper.countUserRoleByRoleIds(roleIds);
    }

}
